<?php


namespace api\zmt\controller;


use api\zmt\model\UserModel;
use api\zmt\validate\UserValidate;
use Qiniu\Auth;
use Qiniu\Storage\UploadManager;

use cmf\controller\RestBaseController;
use think\facade\Filesystem;


class UploadController extends RestBaseController
{
    //图片本地上传
    //添加图片
    public function uploadImage(){
        $file = \request()->file('image');
        // 上传到本地服务器
        $result = Filesystem::disk('public')->putFile('image',$file);
       if($result){
            $this->success('图片上传成功',[
                $result
//                 \request()->domain(). '/storage/' .
            ]);
       }
    }


}